// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
0A95: enable_thread_saving 
thread 'MOTOREK' 
0A95: enable_thread_saving 
wait 0 
jump @MOTOREK_37B 
 

:MOTOREK_37B
wait 6 
if 
   Player.Defined($PLAYER_CHAR)
jf @MOTOREK_37B 
0209: 0@ = random_int_in_ranges 1 7 
0209: 1@ = random_int_in_ranges 105 107 
if 
  0@ == 1 
jf @MOTOREK_3C2 
2@ = 461 
jump @MOTOREK_480 

:MOTOREK_3C2
if 
  0@ == 2 
jf @MOTOREK_3E3 
2@ = 468 
jump @MOTOREK_480 

:MOTOREK_3E3
if 
  0@ == 3 
jf @MOTOREK_404 
2@ = 471 
jump @MOTOREK_480 

:MOTOREK_404
if 
  0@ == 4 
jf @MOTOREK_425 
2@ = 521 
jump @MOTOREK_480 

:MOTOREK_425
if 
  0@ == 5 
jf @MOTOREK_446 
2@ = 522 
jump @MOTOREK_480 

:MOTOREK_446
if 
  0@ == 6 
jf @MOTOREK_467 
2@ = 581 
jump @MOTOREK_480 

:MOTOREK_467
if 
  0@ == 7 
jf @MOTOREK_480 
jump @MOTOREK_480 

:MOTOREK_480
Model.Load(2@)
Model.Load(1@)
038B: load_requested_models 

:MOTOREK_48C
wait 6 
if or
   not Model.Available(2@)
   not Model.Available(1@)
jf @MOTOREK_4C6 
0ACA: show_text_box "~R~~H~FATAL ERROR TERMINATE" 
end_thread 

:MOTOREK_4C6
if and
   Model.Available(2@)
   Model.Available(1@)
jf @MOTOREK_4E2 
jump @MOTOREK_4E9 

:MOTOREK_4E2
jump @MOTOREK_48C 

:MOTOREK_4E9
wait 200 
04C4: store_coords_to 3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 40.0 40.0 0.0 
04D3: get_nearest_car_path_coords_from 3@ 4@ 5@ type 0 store_to 6@ 7@ 8@ 
9@ = Car.Create(2@, 6@, 7@, 8@)
10@ = Actor.CreateAsDriver(Gang2, 1@, 9@)
Actor.SetImmunities(10@, 1, 1, 1, 1, 1)
08C6: set_actor 10@ stay_on_bike 1 
Car.Angle(9@) = 184.7214
Car.RemoveReferences(9@)
00AE: set_car 9@ traffic_behaviour_to 2 
Car.SetDriverBehaviour(9@, FollowRoad)
053F: set_car 9@ tires_vulnerability 0 
Car.SetImmunities(9@, 1, 1, 1, 1, 1)
Car.SetMaxSpeed(9@, 253.0)
0587: enable_car 9@ validate_position 0 
Car.DriveTo(9@, 3@, 4@, 5@)
wait 500 
jump @MOTOREK_5AC 
:MOTOREK_5AC
wait 0
if 
   not Car.Wrecked(9@)
jf @MOTOREK_5C9
if 
8431:   not car 9@ passenger_seat_free 0 
jf @MOTOREK_5C9 
jump @MOTOREK_6E8 

:MOTOREK_5C9
 
0430: put_actor $PLAYER_ACTOR into_car 9@ passenger_seat 0 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1 
Camera.Restore_WithJumpCut
jump @MOTOREK_5FC 


:MOTOREK_5FC
wait 6 
if 
   Player.Defined(0)
jf @MOTOREK_5FC 
if 
00E1:   player 0 pressed_key 6 
jf @MOTOREK_66A 
if 
   not Car.Wrecked(9@)
jf @MOTOREK_66A
0AB6: store_target_marker_coords_to 12@ 13@ 14@ // IF and SET 
if 
00EC:   actor $PLAYER_ACTOR sphere 0 near_point 12@ 13@ radius 2000.0 2000.0 
then
{VE, 0, 869.461, 596.349, -242.99, 2997.06, 2993.87, 900.0, 1, VE
BONE, 0, -480.539, 596.349, -242.99, 869.461, 2993.87, 900.0, 1, BONE
ROBAD, 0, -2997.47, 1659.68, -242.99, -480.539, 2993.87, 900.0, 1, ROBAD
GANTB, 0, -2741.45, 1659.68, -6.10352e-005, -2616.4, 2175.15, 200.0, 1, GANTB
GANTB1, 0, -2741.07, 1490.47, -6.10352e-005, -2616.4, 1659.68, 200.0, 1, GANTB
SF, 0, -2997.47, -1115.58, -242.99, -1213.91, 1659.68, 900.0, 1, SF}



Car.DriveTo(9@, 12@, 13@, 14@)
0ACA: show_text_box "~Y~~H~NOW GO TO YOUR LOCATION" 
end
:MOTOREK_66A
if or
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 12@ 13@ radius 15.0 15.0 in_car 
00E1:   player 0 pressed_key 7 
jf @MOTOREK_6F4 
if 
   not Car.Wrecked(9@)
jf @MOTOREK_6F4 
wait 500 
Car.SetSpeedInstantly(9@, 0.0)
05CD: AS_actor $PLAYER_ACTOR exit_car 9@ 
Car.SetSpeedInstantly(9@, 0.0)
0ACA: show_text_box "~Y~~H~TO SEE THE FOLLOWING CJ" 
wait 50 

:MOTOREK_6E8
Actor.RemoveReferences(10@)
Car.RemoveReferences(9@)
END_THREAD

:MOTOREK_6F4
if or
   not Actor.Driving($PLAYER_ACTOR)
02BF:   car 9@ sunk 
   Player.Wasted($PLAYER_CHAR)
jf @MOTOREK_737 
0ACD: show_text_highpriority "~R~~H~SCRIPT UNLOADING" time 19000 
Actor.RemoveReferences(10@)
Car.RemoveReferences(9@)
END_THREAD 

:MOTOREK_737
0ACD: show_text_highpriority "FIRST MUST SET MARKER /PRESS R2 TO BIKER DRIVE TO WAIPOINT /PRESS R1 TO EXIT BIKE" time 19000 
jump @MOTOREK_5FC 
